<?php

class Core_Action_Admin_Systemhealth_Log_Index extends Action_Admin
{
	function execute($request, $initial = false, $script = null)
	{

		if ($initial)
		{
			// check if bread crum is available
			$breadcrums = array(
				array(
					'url' => 'admin',
					'label' => 'admin'
				),
				array(
					'url' => 'admin/systemhealth',
					'label' => 'system health'
				),
				array(
					'url' => 'admin/systemhealth/log',
					'label' => 'log'
				)
			);

			Agilet::setVar('breadcrum', $breadcrums);
		}
		$items = Model::getTable('core/log') -> fetchAll();
		
		$request -> response = View::render($script = 'core/html/admin/systemhealth/log/index', $data = array('items' => $items));
	}

}
